<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<html>
    <head>
        <script>
            var totals = 1;
            function addInput()
            {
                var newItemText=document.createTextNode("Choose file:");
                var newItemInput=document.createElement("input");
                newItemInput.name="userfile"+(totals++);
                newItemInput.type="file";
                var addfile=document.getElementById("bt_addfile");
                var submit=document.getElementById("bt_submit");
                var newItemBr=document.createElement("br");

                var myform=document.getElementById("upform");
                myform.appendChild(newItemText);
                myform.appendChild(newItemInput);
                myform.appendChild(addfile);
                myform.appendChild(newItemBr);
                myform.appendChild(submit);
            }
        </script>
    </head>
    <h1>Welcome to images' World!</h1>
    <p>Upload image(s) to server:</p>
    <form enctype="multipart/form-data" action="/upload" method=post target=_blank id="upform">
        Choose file:<input name="userfile" type="file">
        <input type="button" value="+" onclick="addInput()" id="bt_addfile">
        </br>
        <input type="submit" value="upload" id="bt_submit">
    </form>
</html>